home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 24 / MacAddict_024_1998_08.iso / Media / Software.dxr / LingoLib_2_Text Handlers.ls < prev    next >
Encoding:
Text File  |  1998-06-04  |  3.1 KB  |  103 lines

  1. on scrollDownFast whichField, originalPosition
  2.   set spriteNum to the clickOn
  3.   set offCast to the castNum of sprite spriteNum
  4.   set onCast to offCast + 1
  5.   set the castNum of sprite spriteNum to onCast
  6.   updateStage()
  7.   puppetSprite(whichField, 1)
  8.   repeat while the mouseDown = 1
  9.     if the top of sprite whichField > originalPosition then
  10.       nothing()
  11.     else
  12.       set the locV of sprite whichField to the locV of sprite whichField + 8
  13.     end if
  14.     if rollOver(spriteNum) then
  15.       set the castNum of sprite spriteNum to onCast
  16.     else
  17.       set the castNum of sprite spriteNum to offCast
  18.     end if
  19.     updateStage()
  20.   end repeat
  21.   set the castNum of sprite spriteNum to offCast
  22.   updateStage()
  23.   return rollOver(spriteNum)
  24. end
  25.  
  26. on scrollUpFast whichField, originalPosition
  27.   set spriteNum to the clickOn
  28.   set originalPosition to the locV of sprite whichField
  29.   set offCast to the castNum of sprite spriteNum
  30.   set onCast to offCast + 1
  31.   set the castNum of sprite spriteNum to onCast
  32.   updateStage()
  33.   puppetSprite(whichField, 1)
  34.   repeat while the mouseDown = 1
  35.     if the bottom of sprite whichField < (originalPosition + 40) then
  36.       nothing()
  37.     else
  38.       set the locV of sprite whichField to the locV of sprite whichField - 8
  39.     end if
  40.     if rollOver(spriteNum) then
  41.       set the castNum of sprite spriteNum to onCast
  42.     else
  43.       set the castNum of sprite spriteNum to offCast
  44.     end if
  45.     updateStage()
  46.   end repeat
  47.   set the castNum of sprite spriteNum to offCast
  48.   updateStage()
  49.   return rollOver(spriteNum)
  50. end
  51.  
  52. on scrollDownSlow whichField, originalPosition
  53.   set spriteNum to the clickOn
  54.   set originalPosition to the locV of sprite whichField
  55.   set offCast to the castNum of sprite spriteNum
  56.   set onCast to offCast + 1
  57.   set the castNum of sprite spriteNum to onCast
  58.   updateStage()
  59.   puppetSprite(whichField, 1)
  60.   repeat while the mouseDown = 1
  61.     if the top of sprite whichField > originalPosition then
  62.       nothing()
  63.     else
  64.       set the locV of sprite whichField to the locV of sprite whichField + 4
  65.     end if
  66.     if rollOver(spriteNum) then
  67.       set the castNum of sprite spriteNum to onCast
  68.     else
  69.       set the castNum of sprite spriteNum to offCast
  70.     end if
  71.     updateStage()
  72.   end repeat
  73.   set the castNum of sprite spriteNum to offCast
  74.   updateStage()
  75.   return rollOver(spriteNum)
  76. end
  77.  
  78. on scrollUpSlow whichField, originalPosition
  79.   set spriteNum to the clickOn
  80.   set originalPosition to the locV of sprite whichField
  81.   set offCast to the castNum of sprite spriteNum
  82.   set onCast to offCast + 1
  83.   set the castNum of sprite spriteNum to onCast
  84.   updateStage()
  85.   puppetSprite(whichField, 1)
  86.   repeat while the mouseDown = 1
  87.     if the bottom of sprite whichField < (originalPosition + 40) then
  88.       nothing()
  89.     else
  90.       set the locV of sprite whichField to the locV of sprite whichField - 4
  91.     end if
  92.     if rollOver(spriteNum) then
  93.       set the castNum of sprite spriteNum to onCast
  94.     else
  95.       set the castNum of sprite spriteNum to offCast
  96.     end if
  97.     updateStage()
  98.   end repeat
  99.   set the castNum of sprite spriteNum to offCast
  100.   updateStage()
  101.   return rollOver(spriteNum)
  102. end
  103.